home *** CD-ROM | disk | FTP | other *** search
Wrap
Text File | 1995-08-10 | 28.2 KB | 805 lines | [ TEXT/MPS ]
(* File: CMApplication.mod Contains: Color Matching Interfaces Version: Technology: ColorSync 2.0 Package: Universal Interfaces 2.1ß1 in “MPW Prerelease” on ETO #17 Copyright: © 1984-1995 by Apple Computer, Inc. All rights reserved. Bugs?: If you find a problem with this file, use the Apple Bug Reporter stack. Include the file and version information (from above) in the problem description and send to: Internet: apple.bugs.applelink.apple.com AppleLink: APPLE.BUGS *) (*$IF UNDEFINED OLDROUTINENAMES*) (*$SET OLDROUTINENAMES FALSE*) (*$END*) (*$TAGS-*) (*$CALLING PASCAL*) MODULE CMApplication; IMPORT SYSTEM, Types, Quickdraw, Files, Printing, CMICCProfile; (* $PUSH*) (* $ALIGN MAC68K*) (* $LibExport+*) CONST gestaltColorSync20* = $0200; kDefaultCMMSignature* = LONG("appl"); (* Macintosh 68K trap word *) cmTrap* = $ABEE; (* PicComment IDs *) cmBeginProfile* = 220; cmEndProfile* = 221; cmEnableMatching* = 222; cmDisableMatching* = 223; cmComment* = 224; (* PicComment selectors for cmComment *) cmBeginProfileSel* = 0; cmContinueProfileSel* = 1; cmEndProfileSel* = 2; (* Defines for version 1.0 CMProfileSearchRecord.fieldMask *) cmMatchCMMType* = $00000001; cmMatchApplProfileVersion* = $00000002; cmMatchDataType* = $00000004; cmMatchDeviceType* = $00000008; cmMatchDeviceManufacturer* = $00000010; cmMatchDeviceModel* = $00000020; cmMatchDeviceAttributes* = $00000040; cmMatchFlags* = $00000080; cmMatchOptions* = $00000100; cmMatchWhite* = $00000200; cmMatchBlack* = $00000400; (* Defines for version 2.0 CMSearchRecord.searchMask *) cmMatchAnyProfile* = $00000000; cmMatchProfileCMMType* = $00000001; cmMatchProfileClass* = $00000002; cmMatchDataColorSpace* = $00000004; cmMatchProfileConnectionSpace* = $00000008; cmMatchManufacturer* = $00000010; cmMatchModel* = $00000020; cmMatchAttributes* = $00000040; cmMatchProfileFlags* = $00000080; (* Result codes *) (* General Errors *) cmProfileError* = -170; cmMethodError* = -171; cmMethodNotFound* = -175; (* CMM not present *) cmProfileNotFound* = -176; (* Responder error *) cmProfilesIdentical* = -177; (* Profiles the same *) cmCantConcatenateError* = -178; (* Profile can't be concatenated *) cmCantXYZ* = -179; (* CMM cant handle XYZ space *) cmCantDeleteProfile* = -180; (* Responder error *) cmUnsupportedDataType* = -181; (* Responder error *) cmNoCurrentProfile* = -182; (* Responder error *) (* Profile Access Errors *) cmElementTagNotFound* = -4200; cmIndexRangeErr* = -4201; (* Index out of range *) cmCantDeleteElement* = -4202; cmFatalProfileErr* = -4203; cmInvalidProfile* = -4204; (* A Profile must contain a LONG("cs1 ") tag to be valid *) cmInvalidProfileLocation* = -4205; (* Operation not supported for this profile location *) (* Profile Search Errors *) cmInvalidSearch* = -4206; (* Bad Search Types.Handle *) cmSearchError* = -4207; cmErrIncompatibleProfile* = -4208; (* Other ColorSync Errors *) cmInvalidColorSpace* = -4209; (* Profile colorspace does not match bitmap type *) cmInvalidSrcMap* = -4210; (* Source pix/bit map was invalid *) cmInvalidDstMap* = -4211; (* Destination pix/bit map was invalid *) cmNoGDevicesError* = -4212; (* Begin/End Matching -- no gdevices available *) cmInvalidProfileComment* = -4213; (* Bad Profile comment during drawpicture *) (* Color Conversion Errors *) cmRangeOverFlow* = -4214; (* One or more output color value overflows in color conversion all input color values will still be converted, and the overflown will be clipped *) (* Other Profile Access Errors *) cmCantCopyModifiedV1Profile* = -4215; (* It is illegal to copy version 1 profiles that have been modified *) (* deviceType values for ColorSync 1.0 Device Profile access *) cmSystemDevice* = LONG("sys "); cmGDevice* = LONG("gdev"); (* Commands for CMFlattenUPP(…) *) cmOpenReadSpool* = 1; cmOpenWriteSpool* = 2; cmReadSpool* = 3; cmWriteSpool* = 4; cmCloseSpool* = 5; (* Flags for PostScript-related functions *) cmPS7bit* = 1; cmPS8bit* = 2; TYPE CMProfileRef* = Types.Ptr; (* Abstract data type for Profile search result *) CMProfileSearchRef* = Types.Ptr; (* Abstract data type for BeginMatching(…) reference *) CMMatchRef* = Types.Ptr; (* Abstract data type for ColorWorld reference *) CMWorldRef* = Types.Ptr; (* Caller-supplied progress function for Bitmap & Quickdraw.PixMap matching routines *) (* Caller-supplied filter function for Profile search *) CMFlattenProcPtr* = (*ΔΔ Types.ProcPtr;*) PROCEDURE (command: LONGINT; VAR size: LONGINT; data: (*ΔΔUNIVΔΔ*) Types.Ptr; refCon: (*ΔΔUNIVΔΔ*) Types.Ptr): Types.OSErr; CMBitmapCallBackProcPtr* = (*ΔΔ Types.ProcPtr;*) PROCEDURE (progress: LONGINT; refCon: (*ΔΔUNIVΔΔ*) Types.Ptr): BOOLEAN; CMProfileFilterProcPtr* = (*ΔΔ Types.ProcPtr;*) PROCEDURE (prof: CMProfileRef; refCon: (*ΔΔUNIVΔΔ*) Types.Ptr): BOOLEAN; CMFlattenUPP* = Types.UniversalProcPtr; CMBitmapCallBackUPP* = Types.UniversalProcPtr; CMProfileFilterUPP* = Types.UniversalProcPtr; CONST uppCMFlattenProcInfo* = $00003FE0; (* PROCEDURE (4 byte param, 4 byte param, 4 byte param, 4 byte param): 2 byte result; *) uppCMBitmapCallBackProcInfo* = $000003D0; (* PROCEDURE (4 byte param, 4 byte param): 1 byte result; *) uppCMProfileFilterProcInfo* = $000003D0; (* PROCEDURE (4 byte param, 4 byte param): 1 byte result; *) PROCEDURE NewCMFlattenProc*(userRoutine: CMFlattenProcPtr): CMFlattenUPP; (*$IF NOT GENERATINGCFM *) INLINE PASCAL $2E9F; (*$END*) PROCEDURE NewCMBitmapCallBackProc*(userRoutine: CMBitmapCallBackProcPtr): CMBitmapCallBackUPP; (*$IF NOT GENERATINGCFM *) INLINE PASCAL $2E9F; (*$END*) PROCEDURE NewCMProfileFilterProc*(userRoutine: CMProfileFilterProcPtr): CMProfileFilterUPP; (*$IF NOT GENERATINGCFM *) INLINE PASCAL $2E9F; (*$END*) PROCEDURE CallCMFlattenProc*(command: LONGINT; VAR size: LONGINT; data: (*ΔΔUNIVΔΔ*) Types.Ptr; refCon: (*ΔΔUNIVΔΔ*) Types.Ptr; userRoutine: CMFlattenUPP): Types.OSErr; (*$IF NOT GENERATINGCFM*) INLINE PASCAL $205F, $4E90; (*$END*) PROCEDURE CallCMBitmapCallBackProc*(progress: LONGINT; refCon: (*ΔΔUNIVΔΔ*) Types.Ptr; userRoutine: CMBitmapCallBackUPP): BOOLEAN; (*$IF NOT GENERATINGCFM*) INLINE PASCAL $205F, $4E90; (*$END*) PROCEDURE CallCMProfileFilterProc*(prof: CMProfileRef; refCon: (*ΔΔUNIVΔΔ*) Types.Ptr; userRoutine: CMProfileFilterUPP): BOOLEAN; (*$IF NOT GENERATINGCFM*) INLINE PASCAL $205F, $4E90; (*$END*) TYPE CMError* = LONGINT; (* For 1.0 and 2.0 profile header variants *) (* CMAppleProfileHeader *) CMAppleProfileHeader* = RECORD (*ΔΔ CASE INTEGER OF 0: ( *) END; CMAppleProfileHeader1* = RECORD(CMAppleProfileHeader) cm1*: CMICCProfile.CMHeader; (*ΔΔ ); 1: ( *) END; CMAppleProfileHeader2* = RECORD(CMAppleProfileHeader) cm2*: CMICCProfile.CM2Header; (*ΔΔ );*) END; (* Param for CWConcatColorWorld(…) *) CMConcatProfileSet* = RECORD keyIndex*: INTEGER; (* Zero-based *) count*: INTEGER; (* Min 1 *) profileSet*: ARRAY 1 (*ΔΔ[0..0]ΔΔ*) OF CMProfileRef; (* Variable. Ordered from Source -> Dest *) END; (* ColorSync color data types *) CMRGBColor* = RECORD red*: INTEGER; (* 0..65535 *) green*: INTEGER; blue*: INTEGER; END; CMCMYKColor* = RECORD cyan*: INTEGER; (* 0..65535 *) magenta*: INTEGER; yellow*: INTEGER; black*: INTEGER; END; CMCMYColor* = RECORD cyan*: INTEGER; (* 0..65535 *) magenta*: INTEGER; yellow*: INTEGER; END; CMHLSColor* = RECORD hue*: INTEGER; (* 0..65535. Fraction of circle. Red at 0 *) lightness*: INTEGER; (* 0..65535 *) saturation*: INTEGER; (* 0..65535 *) END; CMHSVColor* = RECORD hue*: INTEGER; (* 0..65535. Fraction of circle. Red at 0 *) saturation*: INTEGER; (* 0..65535 *) value*: INTEGER; (* 0..65535 *) END; CMLabColor* = RECORD L*: INTEGER; (* 0..65535 maps to 0..100 *) a*: INTEGER; (* 0..65535 maps to -128..127.996 *) b*: INTEGER; (* 0..65535 maps to -128..127.996 *) END; CMLuvColor* = RECORD L*: INTEGER; (* 0..65535 maps to 0..100 *) u*: INTEGER; (* 0..65535 maps to -128..127.996 *) v*: INTEGER; (* 0..65535 maps to -128..127.996 *) END; CMYxyColor* = RECORD capY*: INTEGER; (* 0..65535 maps to 0..1 *) x*: INTEGER; (* 0..65535 maps to 0..1 *) y*: INTEGER; (* 0..65535 maps to 0..1 *) END; CMGrayColor* = RECORD gray*: INTEGER; (* 0..65535 *) END; CMMultichannel5Color* = RECORD components*: ARRAY 5 (*ΔΔ[0..4]ΔΔ*) OF Types.SInt8; (* unsigned char *) (* 0..255 *) END; CMMultichannel6Color* = RECORD components*: ARRAY 6 (*ΔΔ[0..5]ΔΔ*) OF Types.SInt8; (* unsigned char *) (* 0..255 *) END; CMMultichannel7Color* = RECORD components*: ARRAY 7 (*ΔΔ[0..6]ΔΔ*) OF Types.SInt8; (* unsigned char *) (* 0..255 *) END; CMMultichannel8Color* = RECORD components*: ARRAY 8 (*ΔΔ[0..7]ΔΔ*) OF Types.SInt8; (* unsigned char *) (* 0..255 *) END; CMColor* = RECORD (*ΔΔ CASE INTEGER OF 0: ( rgb*: CMRGBColor; ); 1: ( hsv*: CMHSVColor; ); 2: ( hls*: CMHLSColor; ); 3: ( XYZ*: CMXYZColor; ); 4: ( Lab*: CMLabColor; ); 5: ( Luv*: CMLuvColor; ); 6: ( Yxy*: CMYxyColor; ); 7: ( cmyk*: CMCMYKColor; ); 8: ( cmy*: CMCMYColor; ); 9: ( gray*: CMGrayColor; ); 10: ( mc5*: CMMultichannel5Color; ); 11: ( mc6*: CMMultichannel6Color; ); 12: ( mc7*: CMMultichannel7Color; ); 13: ( *) mc8*: CMMultichannel8Color; (*ΔΔ );*) END; CMProfileSearchRecord* = RECORD header*: CMICCProfile.CMHeader; fieldMask*: LONGINT; reserved*: ARRAY 2 (*ΔΔ[0..1]ΔΔ*) OF LONGINT; END; CMProfileSearchRecordPtr* = POINTER TO CMProfileSearchRecord; CMProfileSearchRecordHandle* = HANDLE TO CMProfileSearchRecord (*ΔΔ POINTER TO CMProfileSearchRecordPtr*); (* Search definition for 2.0 *) CMSearchRecord* = RECORD CMMType*: Types.OSType; profileClass*: Types.OSType; dataColorSpace*: Types.OSType; profileConnectionSpace*: Types.OSType; deviceManufacturer*: LONGINT; deviceModel*: LONGINT; deviceAttributes*: ARRAY 2 (*ΔΔ[0..1]ΔΔ*) OF LONGINT; profileFlags*: LONGINT; searchMask*: LONGINT; filter*: CMProfileFilterUPP; END; (* GetCWInfo structures *) CMMInfoRecord* = RECORD CMMType*: Types.OSType; CMMVersion*: LONGINT; END; CMCWInfoRecord* = RECORD cmmCount*: LONGINT; cmmInfo*: ARRAY 2 (*ΔΔ[0..1]ΔΔ*) OF CMMInfoRecord; END; CONST cmNoColorPacking* = $0000; cmAlphaSpace* = $0080; cmWord5ColorPacking* = $0500; cmLong8ColorPacking* = $0800; cmLong10ColorPacking* = $0a00; cmAlphaFirstPacking* = $1000; cmOneBitDirectPacking* = $0b00; cmNoSpace* = 0; cmRGBSpace* = 1; cmCMYKSpace* = 2; cmHSVSpace* = 3; cmHLSSpace* = 4; cmYXYSpace* = 5; cmXYZSpace* = 6; cmLUVSpace* = 7; cmLABSpace* = 8; cmReservedSpace1* = 9; cmGraySpace* = 10; cmReservedSpace2* = 11; cmGamutResultSpace* = 12; cmRGBASpace* = cmRGBSpace + cmAlphaSpace; cmGrayASpace* = cmGraySpace + cmAlphaSpace; cmRGB16Space* = cmWord5ColorPacking + cmRGBSpace; cmRGB32Space* = cmLong8ColorPacking + cmRGBSpace; cmARGB32Space* = cmLong8ColorPacking + cmAlphaFirstPacking + cmRGBASpace; cmCMYK32Space* = cmLong8ColorPacking + cmCMYKSpace; cmHSV32Space* = cmLong10ColorPacking + cmHSVSpace; cmHLS32Space* = cmLong10ColorPacking + cmHLSSpace; cmYXY32Space* = cmLong10ColorPacking + cmYXYSpace; cmXYZ32Space* = cmLong10ColorPacking + cmXYZSpace; cmLUV32Space* = cmLong10ColorPacking + cmLUVSpace; cmLAB32Space* = cmLong10ColorPacking + cmLABSpace; cmGamutResult1Space* = cmOneBitDirectPacking + cmGamutResultSpace; TYPE CMBitmapColorSpace* = LONGINT; CMBitmap* = RECORD image*: SYSTEM.PTR (*ΔΔ POINTER TO CHAR*); width*: LONGINT; height*: LONGINT; rowBytes*: LONGINT; pixelSize*: LONGINT; space*: CMBitmapColorSpace; user1*: LONGINT; user2*: LONGINT; END; (* Classic Print Manager Stuff *) CONST enableColorMatchingOp* = 12; registerProfileOp* = 13; (* PrGeneral parameter blocks *) TYPE TEnableColorMatchingBlk* = RECORD iOpCode*: INTEGER; iError*: INTEGER; lReserved*: LONGINT; hPrint*: Printing.THPrint; fEnableIt*: BOOLEAN; END; TRegisterProfileBlk* = RECORD iOpCode*: INTEGER; iError*: INTEGER; lReserved*: LONGINT; hPrint*: Printing.THPrint; fRegisterIt*: BOOLEAN; END; CONST cmNoProfileBase* = 0; cmFileBasedProfile* = 1; cmHandleBasedProfile* = 2; cmPtrBasedProfile* = 3; TYPE CMFileLocation* = RECORD spec*: Files.FSSpec; END; CMHandleLocation* = RECORD h*: Types.Handle; END; CMPtrLocation* = RECORD p*: Types.Ptr; END; CMProfLoc* = RECORD (*ΔΔ CASE INTEGER OF 0: ( *) fileLoc*: CMFileLocation; (*ΔΔ ); 1: ( handleLoc*: CMHandleLocation; ); 2: ( ptrLoc*: CMPtrLocation; );*) END; CMProfileLocation* = RECORD locType*: INTEGER; u*: CMProfLoc; END; (* Profile file and element access *) PROCEDURE CMOpenProfile*(VAR prof: CMProfileRef; (*CONST*)VAR theProfile: CMProfileLocation): CMError; (*$IF NOT GENERATINGCFM*) INLINE PASCAL $203C, $0008, $001C, $ABEE; (*$END*) PROCEDURE CMCloseProfile*(prof: CMProfileRef): CMError; (*$IF NOT GENERATINGCFM*) INLINE PASCAL $203C, $0004, $001D, $ABEE; (*$END*) PROCEDURE CMUpdateProfile*(prof: CMProfileRef): CMError; (*$IF NOT GENERATINGCFM*) INLINE PASCAL $203C, $0004, $0034, $ABEE; (*$END*) PROCEDURE CMNewProfile*(VAR prof: CMProfileRef; (*CONST*)VAR theProfile: CMProfileLocation): CMError; (*$IF NOT GENERATINGCFM*) INLINE PASCAL $203C, $0008, $001B, $ABEE; (*$END*) PROCEDURE CMCopyProfile*(VAR targetProf: CMProfileRef; (*CONST*)VAR targetLocation: CMProfileLocation; srcProf: CMProfileRef): CMError; (*$IF NOT GENERATINGCFM*) INLINE PASCAL $203C, $000C, $0025, $0ABEE; (*$END*) PROCEDURE CMGetProfileLocation*(prof: CMProfileRef; VAR theProfile: CMProfileLocation): CMError; (*$IF NOT GENERATINGCFM*) INLINE PASCAL $203C, $0008, $003C, $0ABEE; (*$END*) PROCEDURE CMValidateProfile*(prof: CMProfileRef; VAR valid: BOOLEAN; VAR preferredCMMnotfound: BOOLEAN): CMError; (*$IF NOT GENERATINGCFM*) INLINE PASCAL $203C, $000C, $0026, $0ABEE; (*$END*) PROCEDURE CMFlattenProfile*(prof: CMProfileRef; flags: LONGINT; proc: CMFlattenUPP; refCon: (*ΔΔUNIVΔΔ*) Types.Ptr; VAR preferredCMMnotfound: BOOLEAN): CMError; (*$IF NOT GENERATINGCFM*) INLINE PASCAL $203C, $0014, $0031, $0ABEE; (*$END*) PROCEDURE CMUnflattenProfile*(VAR resultFileSpec: Files.FSSpec; proc: CMFlattenUPP; refCon: (*ΔΔUNIVΔΔ*) Types.Ptr; VAR preferredCMMnotfound: BOOLEAN): CMError; (*$IF NOT GENERATINGCFM*) INLINE PASCAL $203C, $0010, $0032, $0ABEE; (*$END*) PROCEDURE CMProfileElementExists*(prof: CMProfileRef; tag: Types.OSType; VAR found: BOOLEAN): CMError; (*$IF NOT GENERATINGCFM*) INLINE PASCAL $203C, $000C, $001E, $0ABEE; (*$END*) PROCEDURE CMCountProfileElements*(prof: CMProfileRef; VAR elementCount: LONGINT): CMError; (*$IF NOT GENERATINGCFM*) INLINE PASCAL $203C, $0008, $001F, $0ABEE; (*$END*) PROCEDURE CMGetProfileElement*(prof: CMProfileRef; tag: Types.OSType; VAR elementSize: LONGINT; elementData: (*ΔΔUNIVΔΔ*) Types.Ptr): CMError; (*$IF NOT GENERATINGCFM*) INLINE PASCAL $203C, $0010, $0020, $0ABEE; (*$END*) PROCEDURE CMGetProfileHeader*(prof: CMProfileRef; VAR header: CMAppleProfileHeader): CMError; (*$IF NOT GENERATINGCFM*) INLINE PASCAL $203C, $0008, $0039, $0ABEE; (*$END*) PROCEDURE CMGetPartialProfileElement*(prof: CMProfileRef; tag: Types.OSType; offset: LONGINT; VAR byteCount: LONGINT; elementData: (*ΔΔUNIVΔΔ*) Types.Ptr): CMError; (*$IF NOT GENERATINGCFM*) INLINE PASCAL $203C, $0014, $0036, $0ABEE; (*$END*) PROCEDURE CMSetProfileElementSize*(prof: CMProfileRef; tag: Types.OSType; elementSize: LONGINT): CMError; (*$IF NOT GENERATINGCFM*) INLINE PASCAL $203C, $000C, $0038, $0ABEE; (*$END*) PROCEDURE CMSetPartialProfileElement*(prof: CMProfileRef; tag: Types.OSType; offset: LONGINT; byteCount: LONGINT; elementData: (*ΔΔUNIVΔΔ*) Types.Ptr): CMError; (*$IF NOT GENERATINGCFM*) INLINE PASCAL $203C, $0014, $0037, $0ABEE; (*$END*) PROCEDURE CMGetIndProfileElementInfo*(prof: CMProfileRef; index: LONGINT; VAR tag: Types.OSType; VAR elementSize: LONGINT; VAR refs: BOOLEAN): CMError; (*$IF NOT GENERATINGCFM*) INLINE PASCAL $203C, $0014, $0021, $0ABEE; (*$END*) PROCEDURE CMGetIndProfileElement*(prof: CMProfileRef; index: LONGINT; VAR elementSize: LONGINT; elementData: (*ΔΔUNIVΔΔ*) Types.Ptr): CMError; (*$IF NOT GENERATINGCFM*) INLINE PASCAL $203C, $0010, $0022, $0ABEE; (*$END*) PROCEDURE CMSetProfileElement*(prof: CMProfileRef; tag: Types.OSType; elementSize: LONGINT; elementData: (*ΔΔUNIVΔΔ*) Types.Ptr): CMError; (*$IF NOT GENERATINGCFM*) INLINE PASCAL $203C, $0010, $0023, $0ABEE; (*$END*) PROCEDURE CMSetProfileHeader*(prof: CMProfileRef; (*CONST*)VAR header: CMAppleProfileHeader): CMError; (*$IF NOT GENERATINGCFM*) INLINE PASCAL $203C, $0008, $003A, $0ABEE; (*$END*) PROCEDURE CMSetProfileElementReference*(prof: CMProfileRef; elementTag: Types.OSType; referenceTag: Types.OSType): CMError; (*$IF NOT GENERATINGCFM*) INLINE PASCAL $203C, $000C, $0035, $0ABEE; (*$END*) PROCEDURE CMRemoveProfileElement*(prof: CMProfileRef; tag: Types.OSType): CMError; (*$IF NOT GENERATINGCFM*) INLINE PASCAL $203C, $0008, $0024, $0ABEE; (*$END*) PROCEDURE CMGetScriptProfileDescription*(prof: CMProfileRef; VAR name: Types.Str255; VAR code: Types.ScriptCode): CMError; (*$IF NOT GENERATINGCFM*) INLINE PASCAL $203C, $000C, $003E, $0ABEE; (*$END*) (* Low-level matching functions *) PROCEDURE NCWNewColorWorld*(VAR cw: CMWorldRef; src: CMProfileRef; dst: CMProfileRef): CMError; (*$IF NOT GENERATINGCFM*) INLINE PASCAL $203C, $000C, $0014, $0ABEE; (*$END*) PROCEDURE CWConcatColorWorld*(VAR cw: CMWorldRef; VAR profileSet: CMConcatProfileSet): CMError; (*$IF NOT GENERATINGCFM*) INLINE PASCAL $203C, $0008, $0015, $0ABEE; (*$END*) PROCEDURE CWNewLinkProfile*(VAR prof: CMProfileRef; (*CONST*)VAR targetLocation: CMProfileLocation; VAR profileSet: CMConcatProfileSet): CMError; (*$IF NOT GENERATINGCFM*) INLINE PASCAL $203C, $000C, $0033, $0ABEE; (*$END*) PROCEDURE CWDisposeColorWorld*(cw: CMWorldRef); (*$IF NOT GENERATINGCFM*) INLINE PASCAL $203C, $0004, $0001, $0ABEE; (*$END*) PROCEDURE CWMatchColors*(cw: CMWorldRef; VAR myColors: CMColor; count: LONGINT): CMError; (*$IF NOT GENERATINGCFM*) INLINE PASCAL $203C, $000C, $0002, $0ABEE; (*$END*) PROCEDURE CWCheckColors*(cw: CMWorldRef; VAR myColors: CMColor; count: LONGINT; VAR result: LONGINT): CMError; (*$IF NOT GENERATINGCFM*) INLINE PASCAL $203C, $0010, $0003, $0ABEE; (*$END*) (* Bitmap matching *) PROCEDURE CWMatchBitmap*(cw: CMWorldRef; VAR bitmap: CMBitmap; progressProc: CMBitmapCallBackUPP; refCon: (*ΔΔUNIVΔΔ*) Types.Ptr; VAR matchedBitmap: CMBitmap): CMError; (*$IF NOT GENERATINGCFM*) INLINE PASCAL $203C, $0010, $002C, $0ABEE; (*$END*) PROCEDURE CWCheckBitmap*(cw: CMWorldRef; (*CONST*)VAR bitmap: CMBitmap; progressProc: CMBitmapCallBackUPP; refCon: (*ΔΔUNIVΔΔ*) Types.Ptr; VAR resultBitmap: CMBitmap): CMError; (*$IF NOT GENERATINGCFM*) INLINE PASCAL $203C, $0014, $002D, $0ABEE; (*$END*) (* Quickdraw-specific matching *) PROCEDURE CWMatchPixMap*(cw: CMWorldRef; VAR myPixMap: Quickdraw.PixMap; progressProc: CMBitmapCallBackUPP; refCon: (*ΔΔUNIVΔΔ*) Types.Ptr): CMError; (*$IF NOT GENERATINGCFM*) INLINE PASCAL $203C, $0010, $0004, $0ABEE; (*$END*) PROCEDURE CWCheckPixMap*(cw: CMWorldRef; VAR myPixMap: Quickdraw.PixMap; progressProc: CMBitmapCallBackUPP; refCon: (*ΔΔUNIVΔΔ*) Types.Ptr; VAR resultBitMap: Quickdraw.BitMap): CMError; (*$IF NOT GENERATINGCFM*) INLINE PASCAL $203C, $0014, $0007, $0ABEE; (*$END*) PROCEDURE NCMBeginMatching*(src: CMProfileRef; dst: CMProfileRef; VAR myRef: CMMatchRef): CMError; (*$IF NOT GENERATINGCFM*) INLINE PASCAL $203C, $000C, $0016, $0ABEE; (*$END*) PROCEDURE CMEndMatching*(myRef: CMMatchRef); (*$IF NOT GENERATINGCFM*) INLINE PASCAL $203C, $0004, $000B, $0ABEE; (*$END*) PROCEDURE NCMDrawMatchedPicture*(myPicture: Quickdraw.PicHandle; dst: CMProfileRef; VAR myRect: Types.Rect); (*$IF NOT GENERATINGCFM*) INLINE PASCAL $203C, $000C, $0017, $0ABEE; (*$END*) PROCEDURE CMEnableMatchingComment*(enableIt: BOOLEAN); (*$IF NOT GENERATINGCFM*) INLINE PASCAL $203C, $0002, $000D, $0ABEE; (*$END*) PROCEDURE NCMUseProfileComment*(prof: CMProfileRef; flags: LONGINT): CMError; (*$IF NOT GENERATINGCFM*) INLINE PASCAL $203C, $0008, $003B, $0ABEE; (*$END*) (* System Profile access *) PROCEDURE CMGetSystemProfile*(VAR prof: CMProfileRef): CMError; (*$IF NOT GENERATINGCFM*) INLINE PASCAL $203C, $0004, $0018, $0ABEE; (*$END*) PROCEDURE CMSetSystemProfile*((*CONST*)VAR profileFileSpec: Files.FSSpec): CMError; (*$IF NOT GENERATINGCFM*) INLINE PASCAL $203C, $0004, $0019, $0ABEE; (*$END*) (* External Profile Management *) PROCEDURE CMNewProfileSearch*(VAR searchSpec: CMSearchRecord; refCon: (*ΔΔUNIVΔΔ*) Types.Ptr; VAR count: LONGINT; VAR searchResult: CMProfileSearchRef): CMError; (*$IF NOT GENERATINGCFM*) INLINE PASCAL $203C, $0010, $0027, $0ABEE; (*$END*) PROCEDURE CMUpdateProfileSearch*(search: CMProfileSearchRef; refCon: (*ΔΔUNIVΔΔ*) Types.Ptr; VAR count: LONGINT): CMError; (*$IF NOT GENERATINGCFM*) INLINE PASCAL $203C, $000C, $0028, $0ABEE; (*$END*) PROCEDURE CMDisposeProfileSearch*(search: CMProfileSearchRef); (*$IF NOT GENERATINGCFM*) INLINE PASCAL $203C, $0004, $0029, $0ABEE; (*$END*) PROCEDURE CMSearchGetIndProfile*(search: CMProfileSearchRef; index: LONGINT; VAR prof: CMProfileRef): CMError; (*$IF NOT GENERATINGCFM*) INLINE PASCAL $203C, $000C, $002A, $0ABEE; (*$END*) PROCEDURE CMSearchGetIndProfileFileSpec*(search: CMProfileSearchRef; index: LONGINT; VAR profileFile: Files.FSSpec): CMError; (*$IF NOT GENERATINGCFM*) INLINE PASCAL $203C, $000C, $002B, $0ABEE; (*$END*) (* Utilities *) PROCEDURE CMGetColorSyncFolderSpec*(vRefNum: INTEGER; createFolder: BOOLEAN; VAR foundVRefNum: INTEGER; VAR foundDirID: LONGINT): CMError; (*$IF NOT GENERATINGCFM*) INLINE PASCAL $203C, $000C, $0011, $0ABEE; (*$END*) PROCEDURE CMGetCWInfo*(cw: CMWorldRef; VAR info: CMCWInfoRecord): CMError; (*$IF NOT GENERATINGCFM*) INLINE PASCAL $203C, $000C, $001A, $0ABEE; (*$END*) (* PS-related *) PROCEDURE CMGetPS2ColorSpace*(srcProf: CMProfileRef; flags: LONGINT; proc: CMFlattenUPP; refCon: (*ΔΔUNIVΔΔ*) Types.Ptr; VAR preferredCMMnotfound: BOOLEAN): CMError; (*$IF NOT GENERATINGCFM*) INLINE PASCAL $203C, $0014, $002E, $0ABEE; (*$END*) PROCEDURE CMGetPS2ColorRenderingIntent*(srcProf: CMProfileRef; flags: LONGINT; proc: CMFlattenUPP; refCon: (*ΔΔUNIVΔΔ*) Types.Ptr; VAR preferredCMMnotfound: BOOLEAN): CMError; (*$IF NOT GENERATINGCFM*) INLINE PASCAL $203C, $0014, $002F, $0ABEE; (*$END*) PROCEDURE CMGetPS2ColorRendering*(srcProf: CMProfileRef; dstProf: CMProfileRef; flags: LONGINT; proc: CMFlattenUPP; refCon: (*ΔΔUNIVΔΔ*) Types.Ptr; VAR preferredCMMnotfound: BOOLEAN): CMError; (*$IF NOT GENERATINGCFM*) INLINE PASCAL $203C, $0018, $0030, $0ABEE; (*$END*) PROCEDURE CMGetPS2ColorRenderingVMSize*(srcProf: CMProfileRef; dstProf: CMProfileRef; VAR vmSize: LONGINT; VAR preferredCMMnotfound: BOOLEAN): CMError; (*$IF NOT GENERATINGCFM*) INLINE PASCAL $203C, $0010, $003D, $0ABEE; (*$END*) (* ColorSync 1.0 functions which have parallel 2.0 counterparts *) PROCEDURE CWNewColorWorld*(VAR cw: CMWorldRef; src: CMICCProfile.CMProfileHandle; dst: CMICCProfile.CMProfileHandle): CMError; (*$IF NOT GENERATINGCFM*) INLINE PASCAL $203C, $000C, $0000, $0ABEE; (*$END*) PROCEDURE ConcatenateProfiles*(thru: CMICCProfile.CMProfileHandle; dst: CMICCProfile.CMProfileHandle; VAR newDst: CMICCProfile.CMProfileHandle): CMError; (*$IF NOT GENERATINGCFM*) INLINE PASCAL $203C, $000C, $000C, $0ABEE; (*$END*) PROCEDURE CMBeginMatching*(src: CMICCProfile.CMProfileHandle; dst: CMICCProfile.CMProfileHandle; VAR myRef: CMMatchRef): CMError; (*$IF NOT GENERATINGCFM*) INLINE PASCAL $203C, $000C, $000A, $0ABEE; (*$END*) PROCEDURE CMDrawMatchedPicture*(myPicture: Quickdraw.PicHandle; dst: CMICCProfile.CMProfileHandle; VAR myRect: Types.Rect); (*$IF NOT GENERATINGCFM*) INLINE PASCAL $203C, $000C, $0009, $0ABEE; (*$END*) PROCEDURE CMUseProfileComment*(profile: CMICCProfile.CMProfileHandle): CMError; (*$IF NOT GENERATINGCFM*) INLINE PASCAL $203C, $0004, $0008, $0ABEE; (*$END*) PROCEDURE CMGetProfileName*(myProfile: CMICCProfile.CMProfileHandle; VAR IStringResult: CMICCProfile.CMIString); (*$IF NOT GENERATINGCFM*) INLINE PASCAL $203C, $0008, $000E, $0ABEE; (*$END*) PROCEDURE CMGetProfileAdditionalDataOffset*(myProfile: CMICCProfile.CMProfileHandle): LONGINT; (*$IF NOT GENERATINGCFM*) INLINE PASCAL $203C, $0004, $000F, $0ABEE; (*$END*) (* ProfileResponder functions *) PROCEDURE GetProfile*(deviceType: Types.OSType; refNum: LONGINT; aProfile: CMICCProfile.CMProfileHandle; VAR returnedProfile: CMICCProfile.CMProfileHandle): CMError; (*$IF NOT GENERATINGCFM*) INLINE PASCAL $203C, $0010, $0005, $0ABEE; (*$END*) PROCEDURE SetProfile*(deviceType: Types.OSType; refNum: LONGINT; newProfile: CMICCProfile.CMProfileHandle): CMError; (*$IF NOT GENERATINGCFM*) INLINE PASCAL $203C, $000C, $0006, $0ABEE; (*$END*) PROCEDURE SetProfileDescription*(deviceType: Types.OSType; refNum: LONGINT; deviceData: LONGINT; hProfile: CMICCProfile.CMProfileHandle): CMError; (*$IF NOT GENERATINGCFM*) INLINE PASCAL $203C, $0010, $0010, $0ABEE; (*$END*) PROCEDURE GetIndexedProfile*(deviceType: Types.OSType; refNum: LONGINT; search: CMProfileSearchRecordHandle; VAR returnProfile: CMICCProfile.CMProfileHandle; VAR index: LONGINT): CMError; (*$IF NOT GENERATINGCFM*) INLINE PASCAL $203C, $0014, $0012, $0ABEE; (*$END*) PROCEDURE DeleteDeviceProfile*(deviceType: Types.OSType; refNum: LONGINT; deleteMe: CMICCProfile.CMProfileHandle): CMError; (*$IF NOT GENERATINGCFM*) INLINE PASCAL $203C, $000C, $0013, $0ABEE; (*$END*) (*$IF OLDROUTINENAMES *) CONST kMatchCMMType* = cmMatchCMMType; kMatchApplProfileVersion* = cmMatchApplProfileVersion; kMatchDataType* = cmMatchDataType; kMatchDeviceType* = cmMatchDeviceType; kMatchDeviceManufacturer* = cmMatchDeviceManufacturer; kMatchDeviceModel* = cmMatchDeviceModel; kMatchDeviceAttributes* = cmMatchDeviceAttributes; kMatchFlags* = cmMatchFlags; kMatchOptions* = cmMatchOptions; kMatchWhite* = cmMatchWhite; kMatchBlack* = cmMatchBlack; (* types *) TYPE CMYKColor* = CMCMYKColor; CWorld* = CMWorldRef; CMGamutResult* = SYSTEM.PTR (*ΔΔ POINTER TO LONGINT*); (* functions *) PROCEDURE EndMatching*(myRef: CMMatchRef); (*$IF NOT GENERATINGCFM*) INLINE PASCAL $203C, $0004, $000B, $0ABEE; (*$END*) PROCEDURE EnableMatching*(enableIt: BOOLEAN); (*$IF NOT GENERATINGCFM*) INLINE PASCAL $203C, $0002, $000D, $0ABEE; (*$END*) PROCEDURE GetColorSyncFolderSpec*(vRefNum: INTEGER; createFolder: BOOLEAN; VAR foundVRefNum: INTEGER; VAR foundDirID: LONGINT): CMError; (*$IF NOT GENERATINGCFM*) INLINE PASCAL $203C, $000C, $0011, $0ABEE; (*$END*) PROCEDURE BeginMatching*(src: CMICCProfile.CMProfileHandle; dst: CMICCProfile.CMProfileHandle; VAR myRef: CMMatchRef): CMError; (*$IF NOT GENERATINGCFM*) INLINE PASCAL $203C, $000C, $000A, $0ABEE; (*$END*) PROCEDURE DrawMatchedPicture*(myPicture: Quickdraw.PicHandle; dst: CMICCProfile.CMProfileHandle; VAR myRect: Types.Rect); (*$IF NOT GENERATINGCFM*) INLINE PASCAL $203C, $000C, $0009, $0ABEE; (*$END*) PROCEDURE UseProfile*(profile: CMICCProfile.CMProfileHandle): CMError; (*$IF NOT GENERATINGCFM*) INLINE PASCAL $203C, $0004, $0008, $0ABEE; (*$END*) PROCEDURE GetProfileName*(myProfile: CMICCProfile.CMProfileHandle; VAR IStringResult: CMICCProfile.CMIString); (*$IF NOT GENERATINGCFM*) INLINE PASCAL $203C, $0008, $000E, $0ABEE; (*$END*) PROCEDURE GetProfileAdditionalDataOffset*(myProfile: CMICCProfile.CMProfileHandle): LONGINT; (*$IF NOT GENERATINGCFM*) INLINE PASCAL $203C, $0004, $000F, $0ABEE; (*$END*) (*$END*) (* $ALIGN RESET*) (* $POP*) END CMApplication.